home *** CD-ROM | disk | FTP | other *** search
/ Euroscene 2 / Euroscene 2.iso / USEFUL / DeliTracker130 / Developer / Developer.run / Examples / Delta2.0.s < prev    next >
Encoding:
Text File  |  1992-09-23  |  2.3 KB  |  125 lines

  1.  
  2.     incdir    "Includes:"
  3.     include    "misc/DeliPlayer.i"
  4.  
  5. ;
  6. ;
  7.     SECTION Player,Code
  8. ;
  9. ;
  10.  
  11.     PLAYERHEADER PlayerTagArray
  12.  
  13.     dc.b '$VER: Delta Music 2.0 player module V1.1 (01 Sep 92)',0
  14.     even
  15.  
  16. PlayerTagArray
  17.     dc.l    DTP_PlayerVersion,0
  18.     dc.l    DTP_PlayerName,PName
  19.     dc.l    DTP_Creator,CName
  20.     dc.l    DTP_Check2,Chk
  21.     dc.l    DTP_Interrupt,Int
  22.     dc.l    DTP_InitPlayer,InitPlay
  23.     dc.l    DTP_EndPlayer,EndPlay
  24.     dc.l    DTP_InitSound,InitSnd
  25.     dc.l    DTP_EndSound,RemSnd
  26.     dc.l    DTP_Volume,Volume
  27.     dc.l    TAG_DONE
  28.  
  29. *-----------------------------------------------------------------------*
  30. ;
  31. ; Player/Creatorname und lokale Daten
  32.  
  33. PName    dc.b 'DeltaMusic_2.0',0
  34. CName    dc.b 'Bent Nielsen,',10
  35.     dc.b 'adapted by Delirium',0
  36.     even
  37. dt_data        dc.l 0
  38.  
  39. *-----------------------------------------------------------------------*
  40. ;
  41. ;Interrupt für Delta Replay
  42.  
  43. Int
  44.     movem.l    d0-d7/a0-a6,-(sp)
  45.     move.l    dt_data(pc),a0
  46.     moveq    #0,d0
  47.     jsr    (a0)                ; DudelDiDum
  48.     movem.l    (sp)+,d0-d7/a0-a6
  49.     rts
  50.  
  51. *-----------------------------------------------------------------------*
  52. ;
  53. ; Testet auf DeltaMusic2.0-Modul
  54.  
  55. Chk
  56.     move.l    dtg_ChkData(a5),a0
  57.     move.l    $bc6(a0),d0
  58.     subi.l    #".FNL",d0
  59.     rts
  60.  
  61. *-----------------------------------------------------------------------*
  62. ;
  63. ; Init Player
  64.  
  65. InitPlay
  66.     moveq    #0,d0
  67.     move.l    dtg_GetListData(a5),a0        ; Function
  68.     jsr    (a0)
  69.     move.l    a0,dt_data
  70.  
  71.     move.l    dtg_AudioAlloc(a5),a0        ; Function
  72.     jsr    (a0)                ; returncode is already set !
  73.     rts
  74.  
  75. *-----------------------------------------------------------------------*
  76. ;
  77. ; End Player
  78.  
  79. EndPlay
  80.     move.l    dtg_AudioFree(a5),a0        ; Function
  81.     jsr    (a0)
  82.     rts
  83.  
  84. *-----------------------------------------------------------------------*
  85. ;
  86. ; Init Sound
  87.  
  88. InitSnd
  89.     moveq    #1,d0
  90.     move.l    dt_data(pc),a0
  91.     jsr    (a0)                ; Init Sound
  92.     rts
  93.  
  94. *-----------------------------------------------------------------------*
  95. ;
  96. ; Remove Sound
  97.  
  98. RemSnd
  99.     lea    $dff000,a0
  100.     moveq    #0,d0
  101.     move.w    d0,$a8(a0)
  102.     move.w    d0,$b8(a0)
  103.     move.w    d0,$c8(a0)
  104.     move.w    d0,$d8(a0)
  105.     move.w    #$000F,$96(a0)            ; End Sound
  106.     rts
  107.  
  108. *-----------------------------------------------------------------------*
  109. ;
  110. ; Set Volume
  111.  
  112. Volume
  113.     moveq    #2,d0                ; set music volume
  114.     move.w    dtg_SndVol(a5),d1
  115.     cmpi.w    #64,d1
  116.     blt.s    SetVolOk
  117.     moveq    #63,d1                ; DM wants volume only from 0 to 63
  118. SetVolOk
  119.     move.l    dt_data(pc),a0
  120.     jsr    (a0)                ; call the player
  121.     rts
  122.  
  123. *-----------------------------------------------------------------------*
  124.  
  125.